<?php

namespace App\Modules\Company\Request;

use Hyperf\Validation\Request\FormRequest;

/**
 * @property int $page
 * @property int $page_size
 */
class CompanyIndexRequest extends FormRequest
{
    public function rules(): array
    {
        return [
            'page' => ['required', 'numeric'],
            'page_size' => ['required', 'max:5']
        ];
    }

    public function messages(): array
    {
        return [
            'page.required' => '页码是必须的',
            'page_size.required' => '页码是必须的',
            'page_size.max' => '页码最大是5',
        ];
    }
}